//
// Created by sxt on 2023/10/18.
//

#ifndef MY_REFLECT_MY_EXCEPTION_H
#define MY_REFLECT_MY_EXCEPTION_H

#include <exception>
#include <string>

namespace myreflect {

    using namespace std;

    /**
     * 自定义msg异常
     */
    class MsgException : public std::exception {
    private:
        std::string message;

    public:
        explicit MsgException(std::string msg);

        [[nodiscard]] const char *what() const noexcept override;
    };

    /**
     * 类未找到异常
     */
    class ClassNotFoundException : public MsgException {
    public:
        explicit ClassNotFoundException(const string &msg);
    };

    /**
     * 字段未找到异常
     */
    class FieldNotFoundException : public MsgException {
    public:
        explicit FieldNotFoundException(const string &msg);
    };

    /**
     * 方法未找到异常
     */
    class MethodNotFoundException : public MsgException {
    public:
        explicit MethodNotFoundException(const string &msg);
    };
}


#endif //MY_REFLECT_MY_EXCEPTION_H
